﻿@model WebsiteSUPPORTASU.Models.GalleryModel

@{
    ViewBag.Title = "AddView";
    Layout = "~/Views/Shared/_Admin.cshtml";
}

<h2>AddView</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>GalleryModel</legend>
        @if (@ViewBag.ElementsNames != null)
        {
            <select class="input" name="eventID">
                @foreach (var Element in @ViewBag.ElementsNames)
                {
                    <option value="@Element.ID">@Element.Name</option>
                }
                @Html.ValidationMessageFor(model => model.eventID)
            </select>
        }
            <div class="editor-label">
                @Html.LabelFor(model => model.name)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.name)
                @Html.ValidationMessageFor(model => model.name)
            </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.type)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.type)
            @Html.ValidationMessageFor(model => model.type)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.location)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.location)
            @Html.ValidationMessageFor(model => model.location)
            <a>EX: Content/images/events/event name</a>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.comments)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.comments)
            @Html.ValidationMessageFor(model => model.comments)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
